﻿@using Microsoft.AspNetCore.Identity
@using AlpineSkiHouse.Models

@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager

@if (SignInManager.IsSignedIn(User))
{
    <form asp-controller="Account" asp-action="LogOff" method="post" id="logoutForm" class="form-inline float-lg-right">
        <ul class="nav navbar-nav float-sm-right">
            <li class="nav-item"><a class="nav-link" asp-controller="Manage" asp-action="Index" title="Manage">Hello @UserManager.GetUserName(User)!</a></li>
            <li class="nav-item"><button type="submit" class="btn btn-link navbar-btn navbar-link">Log off</button></li>
        </ul>
</form>
}
else
{
    <ul class="nav navbar-nav float-sm-right">
        <li class="nav-item"><a class="nav-link" asp-controller="Account" asp-action="Register">Register</a></li>
        <li class="nav-item"><a class="nav-link" asp-controller="Account" asp-action="Login">Log in</a></li>
    </ul>
}
